home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
libs
/
knowhow4
/
work.bas
< prev
next >
Wrap
BASIC Source File
|
1994-05-30
|
2KB
|
99 lines
& Initialization
ARRAY[12];
X = 1
STRING = "Hello"
FOR j = 1 TO 10
ARRAY[j] = j
PRINT "ARRAY[j] = ", ARRAY[j];
NEXT
FOR i = 1 TO 10
@sub(ARRAY[i], i)
NEXT
PRINT "";
PRINT "";
INPUT "Input ARRAY[2]: ", ARRAY[2];
PRINT ARRAY[2];
INPUT "Input REAL X: ", X;
PRINT X;
INPUT "Input STRING: ", STRING;
PRINT STRING;
ARRAY[3] = ARRAY[2]
PRINT ARRAY[3];
GOTO label
PRINT "No label jump";
!label
PRINT "Label jump";
& x = 1
& x = SPECIAL(5, 6)
& PRINT x;
PRINT " Parent SLANG class operators: ";
k = 1
PRINT " INPUT < Quoted commentaries >, Variable (previously assigned) ";
INPUT "Input k > 10, k < 40: ", k;
PRINT "";
PRINT "";
PRINT "PRINT <Quoted string or variables >, ... ; means new line";
PRINT "";
PRINT "";
PRINT "FOR x = start value TO end value";
PRINT "...........CYCLE BODY...........";
PRINT "NEXT";
FOR j = 1 TO k
PRINT " j = ", j;
NEXT
PRINT "";
PRINT "";
PRINT "IF Expression Condition Expression THEN Task";
PRINT "If Condition is TRUE, we execute Task, else - pass control to";
PRINT "the next line";
PRINT "";
PRINT "";
PRINT "@sub(arguments) is the subroutine call. We put subroutines after ";
PRINT "END operator at the end of main part of the program:";
PRINT "END";
PRINT "@sub(a, b)";
PRINT "......Subroutine body..........";
PRINT " RETURN <argument>";
PRINT "<argument> will be assigned to the 'retval' variable";
FOR i = 1 TO k
@sub(i, k - i)
NEXT
PRINT "PLAY External file name executes program from another file";
PLAY "WORK1.BAS"
END
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& FUNCTIONS &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
@sub(a, b)
PRINT " a = ", a, " b = ", b;
RETURN